home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
tifreadr.sit
/
Tiff Window DEMO
/
adjust scroll bars.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-31
|
993b
|
30 lines
#include "my color.h"
void adjust_scroll_bars(whichWindow) /* this routine is called from the "do mouse" routine.
Here I will re-size and move the scroll bars
if the user has "grown" the window */
CWindowPtr whichWindow;
{
ControlHandle control;
control = ((CWindowPeek)whichWindow)->controlList;
while(control)
{
if((*control)->contrlRfCon == HORIZONTAL_SCROLL)
{
MoveControl(control, (*control)->contrlOwner->portRect.left - ONE_PIXEL,
(*control)->contrlOwner->portRect.bottom - BAR_WIDTH + ONE_PIXEL);
SizeControl(control, (*control)->contrlOwner->portRect.right - BAR_WIDTH + 2,
BAR_WIDTH);
}
else if((*control)->contrlRfCon == VERTICLE_SCROLL)
{
MoveControl(control, (*control)->contrlOwner->portRect.right - BAR_WIDTH + ONE_PIXEL,
(*control)->contrlOwner->portRect.top - ONE_PIXEL);
SizeControl(control, BAR_WIDTH,
(*control)->contrlOwner->portRect.bottom - BAR_WIDTH + 2);
}
control = (*control)->nextControl;
}
}